package com.traffic.managent.model.customer;

import com.traffic.managent.annotation.ModelBind;
import com.traffic.managent.base.SessionUser;
import com.traffic.managent.jedis.RedisKit;
import com.traffic.managent.plugin.ParamInitThread;

@ModelBind(table = "cx_customer_info", key = "customerId")
public class Customer extends SessionUser<Customer> {
	public static final long serialVersionUID =  1L;
	public static final Customer dao = new Customer();

	/**
	 * 添加或者更新缓存
	 */
	public void cacheAdd(String ids) {
		Customer customer = dao.findById(ids);
		RedisKit.put(ParamInitThread.cacheStart_customer + customer.getStr("customerId"), customer);
	}
	
}
